<template>
	<view class="box">
		<view class="flex a-t" style="border-radius: 6px;border: #fa1e8a dashed 1px;line-height: 42px;box-sizing: border-box;padding: 0 10px;">
			请输入名称：<input type="text" style="font-size: 13px;" v-model="name" placeholder="请输入名称">
		</view>
		<!-- <view class="f12 c6" style="margin-top: 10px;">
			如果您没有设置周期，系统会根据记录自动计算。恢复系统计算请选择0
		</view> -->
		<view>
			<view @click="submit" class="button button1">保存</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name:''
			}
		},
		onLoad() {
			uni.setNavigationBarColor({
			    frontColor: '#000000',  
			    backgroundColor: '#ffffff',    
			})
		},
		methods: {
			async submit(){
				let data={
					my_space_id:this.vuex_user_content.id,
					name:this.name
				}
				console.log(data)
				let res =await this.$u.api.AddMthing(data)
				console.log(res)
				if(res){
					uni.showToast({
						title:'添加成功',
						icon:'none'
					})
					setTimeout(()=>{
						uni.navigateBack()
					},500)
				}
			}
		}
	}
</script>

<style>
	page{
		background: #fff;
	}
.button1{
	width: 300px; line-height: 40px; text-align: center; margin: 10px auto 0px;
}
</style>
